package thread;

/**
 * Title：
 * Description：
 * Created by Myth on 4/17/2017.
 */
public class SleepThread implements Runnable {
    private int time;
    public SleepThread(int time) {
        this.time = time;
    }
    @Override
    public void run() {
        for (int i = 0; i < 6; i++) {
            try {
                Thread.sleep(time);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName()+"线程，休眠了 "+time+"毫秒");
        }
    }
}
